<template>
	<view class="FloatTopButton" :class="{'pc-float': isPc}" @click="onFloatTop">
		<image src="/static/home-top-but.png" class="float-image"></image>
	</view>
</template>

<script>
	export default {
		name: "FloatTopButton",
		data() {
			return {

			};
		},
		methods: {
			onFloatTop() {
				uni.pageScrollTo({
					scrollTop: 0
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	.FloatTopButton {
		width: 94upx;
		height: 94upx;
		position: fixed;
		right: 14upx;
		bottom: 20upx;
		z-index: 20;

		.float-image {
			width: 100%;
			height: 100%;
		}
	}
	.pc-float{
		width: 52px;
		height: 52px;
		right: 86px;
		bottom: 300px;
	}
</style>